-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oqamar cleanup1 #37
base: master
Are you sure you want to change the base?
Oqamar cleanup1 #37
Conversation
return time.Now(), fmt.Errorf("ibgo: '%s' too short to be datetime format '%s'", timeString, format) | ||
return t, fmt.Errorf("ibgo: '%s' too short to be datetime format '%s'", timeString, format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for this change? As t
is never set, so it would be the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just trying to make consistent with idiomatic Go. For example, in the case of:
t, err := time.Parse("20060102", "bad date")
The value of t is the default value
return time.Now(), fmt.Errorf("ibgo: '%s' does not contain expected whitespace for datetime format '%s'", timeString, format) | ||
return t, fmt.Errorf("ibgo: '%s' does not contain expected whitespace for datetime format '%s'", timeString, format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
return time.Now(), fmt.Errorf("ibgo: '%s' wrong length to be datetime format '%s'", timeString, format) | ||
return t, fmt.Errorf("ibgo: '%s' wrong length to be date format '%s'", timeString, format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
return time.Now(), fmt.Errorf("ibgo: unsupported read time format '%v'", f) | ||
return t, fmt.Errorf("ibgo: unsupported read time format '%v'", f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
@@ -156,7 +154,7 @@ func readTime(b *bufio.Reader, f timeFmt) (t time.Time, err error) { | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing consistent change if returning error.
No description provided.